#ifndef _PROGRAM_H_
#define _PROGRAM_H_

#include <vector>
#include <string>
#include "ISA.h"


class CInstruction;

struct SLabel
{
public:
	std::string name;
	unsigned int position;
	CInstruction *instruction;

	bool operator<(const SLabel &l) const
	{
		return position < l.position;
	}
};




class CProgram
{
public:
	CProgram();

	void generateInstructions(unsigned int length);
	void writeToFile(const std::string &filename);
    void checkForHazards();
private:
	CISA isa;
	std::vector<CInstruction*> instructionList;
	std::vector<SLabel> labelList;
};


#endif
